#!/bin/sh
     
KEY1="us"
KEY2="mm"
CURRENT_KEY=$(setxkbmap -query | tail -n 1 | cut -f6 -d ' ')
if [ "$CURRENT_KEY" = $KEY1 ]; then
    setxkbmap $KEY2
else
    setxkbmap $KEY1
fi
